package eco2automotive.gui.components;
import javax.swing.*;
import java.awt.*;

/** 
 * JPanel, display the Error(s) Found & Description. 
  * @version 1.0
  * @autor Fco. Javier Sánchez Esparza
 */
public class Panel_DTCs extends JPanel{
     private JTextArea console; 
     private JScrollPane scroll;
   
     
     /**
      * Creat a new JTextArea whit scroll
      */
     public Panel_DTCs(){
     console= new JTextArea(">");
     console.setColumns(50);         
     console.setRows(10);     
     
     scroll = new JScrollPane(console);
     scroll.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
     scroll.setBorder(new javax.swing.border.TitledBorder("Error(s) Found & Description."));  
     //this.setLayout(new GridLayout(2,1,2,2));
     this.add(scroll);
     }     
     /**
      * 
      * @param str
      */
     public void updateInformation(String str){
     console.append("\n"+str);
     }
     
     
}
